import gtk

class MainWindow(gtk.Window):
	frame_top = None
	frame_bot = None
	main_vbox = None

	def __init__(self, parent=None):
		gtk.Window.__init__(self)
		try:
			self.set_screen(parent.get_screen())
		except AttributeError:
			self.connect('destroy', lambda *w: gtk.main_quit())
		
		self.set_title("Class Designer 0.1")
		self.set_default_size(650,536)
		
		self.window_area = gtk.Fixed()
		self.add(self.window_area)

		self.frame_top = gtk.Frame(" Class definition ")
		self.frame_bot = gtk.Frame(" File policy ")
		self.frame_top.set_size_request(640,255)
		self.frame_bot.set_size_request(640,235)
		self.window_area.put(self.frame_top, 5, 5)
		self.window_area.put(self.frame_bot, 5, 265)

		self.button_create = gtk.Button("Create")
		self.button_cancel = gtk.Button("Cancel")
		self.button_create.set_size_request(80,26)
		self.button_cancel.set_size_request(80,26)
		self.window_area.put(self.button_cancel, 325, 505)
		self.window_area.put(self.button_create, 245, 505)

		self.area_frame_top = gtk.Fixed()
		self.frame_top.add(self.area_frame_top)

		self.label_class_name  = gtk.Label("Class name: ")
		self.entry_class_name  = gtk.Entry() 
		self.entry_class_name.set_width_chars(40)
		self.area_frame_top.put(self.label_class_name, 10,  0)
		self.area_frame_top.put(self.entry_class_name, 80, 0)
		
		self.show_all()

def main():
	mw = MainWindow()
	gtk.main()

if __name__ == '__main__':
	main()
